package com.zqh.irmadscore.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zqh.irmadscore.mapper.SdgFailureMapper;
import com.zqh.irmadscore.model.entity.SdgFailure;
import com.zqh.irmadscore.service.SdgFailureService;
import org.springframework.stereotype.Service;

@Service
public class SdgFailureServiceImpl extends ServiceImpl<SdgFailureMapper, SdgFailure> implements SdgFailureService {
    @Override
    public void updateSdgFailureForZero() {


        LambdaUpdateWrapper<SdgFailure> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
        lambdaUpdateWrapper.set(SdgFailure::getSumProbability, 0.0);
        lambdaUpdateWrapper.set(SdgFailure::getNum, 0);
        this.update(lambdaUpdateWrapper);

    }

}
